﻿@model IEnumerable<OpenIdProvider>
@{
    ViewBag.Title = "OpenID Authentication";
}

@*<h2>Login</h2>*@



@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    <fieldset>
        <legend>Log in using one of the following open ID provider services</legend>
        @*<input type="image" name="loginIdentifier" value="http://yahoo.com" title="aaa"  src="~/Content/images/openid-providers/yahoo-openid-signin-yellow.png" />
        <p>
            <button class="btn" type="submit" name="loginIdentifier" value="https://www.google.com/accounts/o8/id">Login using Google</button></p>
        <p>
            <button class="btn" type="submit" name="loginIdentifier" value="http://yahoo.com">Login using Yahoo!</button></p>*@
        @if (Model != null)
        {
            foreach (OpenIdProvider provider in Model)
            {
                <p><button class="btn" type="submit" name="loginIdentifier" 
                    value="@provider.Url">Login using @provider.Name</button></p>
            }
        }
    </fieldset>
}

<div class="alert alert-info">
    <button type="button" class="close" data-dismiss="alert">×</button>
    <strong>Information</strong> 
    <p>
        Is user authenticated: @User.Identity.IsAuthenticated<br />
        Identity name: @User.Identity.Name
    </p>
</div>